# SPDX-License-Identifier: BSD-3-Clause
# Copyright Contributors to the OpenEXR Project.

module(
    name = "openexr",
    compatibility_level = 1,
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "imath")
bazel_dep(name = "openjph")
bazel_dep(name = "libdeflate")
bazel_dep(name = "platforms", version = "0.0.11")
bazel_dep(name = "rules_cc", version = "0.1.1")

archive_override(
    module_name = "imath",
    patches = [
        "//bazel:imath_add_build_file.patch",
        "//bazel:imath_module_dot_bazel.patch",
    ],
    strip_prefix = "Imath-main",
    urls = ["https://github.com/AcademySoftwareFoundation/Imath/archive/refs/heads/main.zip"],
)

archive_override(
    module_name = "libdeflate",
    patches = [
        "//bazel:libdeflate_add_build_file.patch",
        "//bazel:libdeflate_module_dot_bazel.patch",
    ],
    strip_prefix = "libdeflate-master",
    urls = ["https://github.com/ebiggers/libdeflate/archive/refs/heads/master.zip"],
)

archive_override(
    module_name = "openjph",
    patches = [
        "//bazel:openjph_add_build_file.patch",
        "//bazel:openjph_module_dot_bazel.patch",
    ],
    strip_prefix = "OpenJPH-0.21.5",
    urls = ["https://github.com/aous72/OpenJPH/archive/refs/tags/0.21.5.zip"],
)
